import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { NgModule } from '@angular/core';

// 3rd
import { NZ_LOCALE, enUS } from 'ng-zorro-antd';
import { NgZorroAntdModule, NZ_MESSAGE_CONFIG } from 'ng-zorro-antd';

// me
import { SharedModule } from './shared/shared.module';
import { CoreModule } from './core/core.module';
import { LayoutModule } from './layout/layout.module';
import { RoutesModule } from './routes/routes.module';
import { AppComponent } from './app.component';

import { SwaggerModule, SWAGGER_UI_CONFIG } from './swagger';
import { environment } from 'environments/environment';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    // 3rd
    NgZorroAntdModule.forRoot(),
    // me
    SharedModule.forRoot(),
    SwaggerModule.forRoot(),
    CoreModule,
    LayoutModule,
    RoutesModule
  ],
  providers: [
    // 3rd
    { provide: NZ_LOCALE, useValue: enUS },
    { provide: NZ_MESSAGE_CONFIG, useValue: { nzDuration: 1500 } },
    { provide: SWAGGER_UI_CONFIG, useValue: { url: environment.server } }
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
